<template>
  <div class="mine">
    我的页面


    <router-link :to="'/data/'+666">点我router-link路由传参1</router-link>
    <router-link :to="{path:'/data',query:{name:888}}">点我router-link路由传参2</router-link>
    <router-link :to="{name:'data',params:{name:arr}}">点我router-link路由传参3</router-link>
    <span @click="fun1">点我路由传参1</span>
    <span @click="fun2">点我路由传参2</span>
    <span @click="fun3">点我路由传参3</span>
  </div>
</template>

<script>
export default {
  data(){
    return{
      arr:[1,2,3,4,5]
    }
  },
  methods:{
    fun1(){
      this.$router.push('/data/'+666)
    },
     fun2(){
      this.$router.push({path:"/data",query:{name:666}})
    },
     fun3(){
      this.$router.push({name:'data',params:{name:this.arr}})
    }
  }
}
</script>

<style scoped lang="scss">
.mine{
  display: flex;
  flex-direction: column;
  align-items: center;
  a{
    margin: 10px;
  }
  span{
    padding: 10px;
  }
}

</style>